package com.hmall.common.client;

import com.hmall.common.interceptor.FeignConfig;
import com.hmall.common.thread.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "userservice",configuration = FeignConfig.class)
public interface UserFeignClient {

    /**
     * 根据id获取用户信息的接口暴露
     * @param id
     * @return
     */
    @GetMapping("/user/{id}")
    public User getUser(@PathVariable Long id);
}
